\ProvidesPackage{qpedia}
\RequirePackage{tikz}
\RequirePackage{CJKutf8}
\RequirePackage[T1]{fontenc}
\RequirePackage{calc}
\RequirePackage{url}
\RequirePackage{verbatim}
\RequirePackage{makeidx}
\RequirePackage{fancyhdr}
\RequirePackage{graphicx}
\RequirePackage{booktabs}
\RequirePackage{indentfirst}
\usepackage[section]{placeins}
\RequirePackage[colorlinks,linkcolor=blue,anchorcolor=blue,citecolor=green]{hyperref}
%\usepackage{showidx}
\RequirePackage[a4paper,%
	includehead,%
	includefoot,%
	top=2cm,%
	bottom=2cm%
	]{geometry}

\pagestyle{fancy}
%\addtolength{\headwidth}{\marginparsep}
%\addtolength{\headwidth}{\marginparwidth}
%\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}%show the page num
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\fancypagestyle{plain}{%
   \fancyhead{} % get rid of headers
   \renewcommand{\headrulewidth}{0pt} % and the line
}
% Intro Environment
\newenvironment{intro}{\sffamily}{\vspace*{2ex minus 1.5ex}}

% lined Environment
\newenvironment{lined}[1]% 1: the rule width
  {\begin{center}\begin{minipage}{#1}\hrule\medskip}
  {\vspace{-1ex}\hrule \end{minipage} \end{center}}
 

%%the uppersize of the reference
\newcommand{\citeu}[1]{$^{\mbox{\protect \scriptsize \cite{#1}}}$}

\RequirePackage{epigraph}
\setlength{\epigraphwidth}{.7\textwidth}

% I want no headers on pages created by clearpage
\renewcommand{\cleardoublepage}
    {\clearpage\if@twoside \ifodd\c@page\else
    \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}

% fonts
\newcommand{\gkai}{\CJKfamily{gkai}}
\newcommand{\hei}{\CJKfamily{gkai}}

% Fig
\newcommand{\FIG}[3]
{
	\noindent\begin{figure}[htpb]
	  \centering
	  \includegraphics[width=#3,keepaspectratio]{#2}
	  \caption{\label{#2}#1}
	\end{figure}
}

\newcommand{\FIGFIX}[4]
{
	\begin{figure}[h]
	  \centering
	  \includegraphics[totalheight=#3]{#2}
	  \caption{#1} \label{#4}
	\end{figure}
}



%use CJK as default enviorment
%\AtBeginDocument{\begin{CJK*}{UTF8}{gbsn}\CJKtilde\CJKindent\CJKcaption{utf8}}
%\AtEndDocument{\clearpage\end{CJK*}}

%\newcommand{\fnto}{\fontsize{32}{40}\selectfont} %xiaochu 1.5 
% use CJK as default environment
%\AtBeginDocument{\begin{CJK}{UTF8}{gbsn}\CJKtilde\CJKindent{utf8}}
%\AtEndDocument{\clearpage\end{CJK}}

% CJKcaption
%\renewcommand\chaptername{\CJKprechaptername\CJKthechapter\CJKchaptername}

%\renewcommand\figurename{图}
%\renewcommand\indexname{索引}
%\renewcommand\tablename{表}

%%%
%\topmargin 00mm
%\oddsidemargin 0mm
%\evensidemargin 0mm
%\textwidth 155mm
%\textheight 210mm
%\parindent 2\ccwd
%\parskik 00mm
%\hyphenpenalty=1500
%\flushbottom
